import java.io.*;
import org.springframework.beans.factory.*;
import org.springframework.beans.factory.xml.*;
import org.springframework.core.io.*;

public class HelloClient

{

	public static void main(String args[]) throws Exception

	{

		try

		{
			System.out.println("please Wait.");
			Resource res = new ClassPathResource("hello.xml");
			System.out.println("1");
			BeanFactory factory = new XmlBeanFactory(res);
			System.out.println("2");
			Hello bean1 = (Hello) factory.getBean("Hello1");
			System.out.println("3");
			String s = bean1.sayHello("Udit");
			System.out.println(s);
		}

		catch (Exception e1)

		{
			System.out.println("" + e1);
		}

	}

}